﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Remoting.Messaging;
using System.Text;
using CustomUtils;
using System.Net;
using System.Text;
using System.Text.RegularExpressions;

namespace CustomUtilsTest
{
	class Program
	{
		static void Main(string[] args)
		{
			//var d = new Converter();


			var s = @"
ssdfgsdfg


Имя клиента: test name
Телефон: test tel
Обратный E-Mail: testemail@mail.ru
Сайт: Фасад Каркас

==================================
test texttest texttest texttest texttest texttest texttest 
texttest texttest texttest texttest text";
			var re = new Regex(@"(.|\W)*^Имя клиента: (.*)$\W*^Телефон: (.*)$\W*Обратный E-Mail: (.*)$\W*Сайт: (.*)$\W*=+\W*((.|\W)*)", RegexOptions.Multiline);
			var r = re.Match(s);
			var z = r;
		


			return;

			var t = new Translit();




			var p = new Parser();
			p.GetMessageDataString("");
			return;
			using (var client = new WebClient())
			{
				client.Encoding = System.Text.Encoding.UTF8;
				var message = "";
				var number = "";
				client.Headers.Add(HttpRequestHeader.ContentType, "text/xml");
				client.Headers.Add(HttpRequestHeader.Accept,
					"application/xml,application/xhtml+xml,text/html;q=0.9, text/plain;q=0.8,image/png,*/*;q=0.5");

				var BarexSMSTemplate = "";
				var BarexLogin = "";
				var BarexPassword = "";
				var BarexSender = "";
				var BarexAddress = "http://sms.barex.com.ua/websend/";
				var messageXML = "<?xml version=\"1.0\" encoding=\"UTF-8\" ?><request method=\"send-sms\" login=\"it-sfera\" passw=\"its2010\"><msg id=\"1\" sn=\"IT-SFERA\" encoding=\"cyrillic\">Привіт</msg><phone number=\"+380936532134\"/></request>";
				//object[] param = new object[] { BarexLogin, BarexPassword, BarexSender, message, number };

				//var messageXML = string.Format(BarexSMSTemplate, param);
				var res = client.UploadString(new Uri(BarexAddress), messageXML);

				return;
			}



			var dss = "10.11.2014;10.11.2014;".Trim().Split(';').Select(DateTime.Parse).ToArray();
			var f = new WorkDateTime();
			f.SetWorkDaysOfWeek(5);
			f.SetWorkStartTime(9,0);
			f.SetWorkFinishTime(18,0);
			f.SetHolidayDatesFromStringDateArray (new string[]{"2014-11-17", "2014-11-18", "2014-11-19"});
			var sd = f.GetWorkMinutes(DateTime.Parse("2014-11-02 18:14"), DateTime.Parse("2014-11-05 13:16"));

		}
	}
}
